import instance from '@/http/index.js'
//注册
export const register = (data) => {
  // 接收输入的数据
  const { account, password } = data
  return instance({
    url: '/api/register',
    method: 'POST',
    data: {
      account,
      password,
    },
  })
}
//登录
export const login = (data) => {
  // 接收输入的数据
  const { account, password } = data
  return instance({
    url: '/api/login',
    method: 'POST',
    data: {
      account,
      password,
    },
  })
}
//去login页面调用接口